<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>https://cn.vuejs.org/v2/guide/list.html</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="bootstrap.css">
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="vue.js"></script>
    <script type="text/javascript" src="bootstrap.js"></script>
</head>
<body>
<div class="container" id="box">
    <div class="row">
        <div class="col-lg-12">
            <div class="row">
                <div class="panel panel-info">
                    <div class="panel-heading panel-title">
                        <div class="h3 text-success text-center">
                            <form action="http://rrg.wshoto.com/web/index.php?c=user&a=login&" method="post" role="form" id="form1" onsubmit="return formcheck();">
                                <div class="form-group input-group">
                                    <span id="message" class="text-danger"></span>
                                </div>
                                <div class="form-group input-group">
                                    <div class="input-group-addon"><i class="fa fa-user"></i></div>
                                    <input name="username" type="text" class="form-control input-lg"
                                           placeholder="请输入用户名登录">
                                </div>
                                <div class="form-group input-group">
                                    <div class="input-group-addon"><i class="fa fa-unlock-alt"></i></div>
                                    <input name="password" type="password" class="form-control input-lg"
                                           placeholder="请输入登录密码">
                                </div>
                                <div class="form-group">
                                    <label class="checkbox-inline input-lg">
                                        <input type="checkbox" value="true" name="rember"> 记住用户名
                                    </label>
                                    <div class="pull-right">
                                        <a href="./index.php?c=user&a=register&" class="btn btn-link btn-lg">注册</a>
                                        <input type="submit" id="submit" name="submit" value="登录"
                                               class="btn btn-primary btn-lg"/>
                                        <input name="token" value="e9e2125a" type="hidden"/>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div class="panel-body">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
<script type="text/javascript">

    $.post('http://rrg.wshoto.com/web/index.php?c=user&a=login&', {
        username: "admin",
        password: '',
        token: 'e9e2125a'
    }, function (resq) {
        console.log(resq)
    }, 'json')

    var vue = new Vue({
        el: "#box",
        data: {
            name: '',
            age: undefined,
            person: [],
            url: {
                github: 'https://api.github.com/',
                user_url: 'https://api.github.com/users/zhangrxiang'
            },
            api: {
                all: undefined,
                user: undefined
            }
        },
        methods: {
            getApi: function () {
                $.get(this.url.github, undefined, function (data) {
                    vue.api.all = data;
                }, 'json')
            },
            getInfo: function () {
                $.get(this.url.user_url, undefined, function (data) {
                    vue.api.user = data;
                }, 'json')
            }
        }
    });
</script>